<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
  <style>
    div{width: 100px;height: 100px;
      border: 1px solid red}
    div:hover{
      /*margin: 10px 0 0 10px;*/
      /*设置为相对定位*/
      position: relative;
      /*通过left/right/top/bottom相对于元素自身位置偏移*/
      top: 10px;
      left: 10px;
    }
  </style>
</head>
<body>
<div>div1</div>
<div>div2</div>
<div>div3</div>
</body>
</html>